[XEN] x86-64: don't compile some unused MTRR code
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 13 Nov 2006 14:11:08 +0000 (14:11 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 13 Nov 2006 14:11:08 +0000 (14:11 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/cpu/mtrr/Makefile
xen/arch/x86/cpu/mtrr/main.c

index 445138aa3c52c932426ebff26c3d32afedbf7ffb..213a7787af93b474116b1085d5cbc1843efc30f2 100644 (file)
@@ -1,6 +1,6 @@
-obj-y += amd.o
-obj-y += centaur.o
-obj-y += cyrix.o
+obj-$(x86_32) += amd.o
+obj-$(x86_32) += centaur.o
+obj-$(x86_32) += cyrix.o
 obj-y += generic.o
 obj-y += main.o
 obj-y += state.o
index 5684d40c89d78e39d18e3b6e9391894636a4c201..72cab7be1b8371df185e9257c0c43e7930d1c325 100644 (file)
@@ -64,7 +64,11 @@ struct mtrr_ops * mtrr_if = NULL;
 static void set_mtrr(unsigned int reg, unsigned long base,
                     unsigned long size, mtrr_type type);
 
+#ifndef CONFIG_X86_64
 extern int arr3_protected;
+#else
+#define arr3_protected 0
+#endif
 
 static char *mtrr_strings[MTRR_NUM_TYPES] =
 {
@@ -539,9 +543,11 @@ extern void centaur_init_mtrr(void);
 
 static void __init init_ifs(void)
 {
+#ifndef CONFIG_X86_64
        amd_init_mtrr();
        cyrix_init_mtrr();
        centaur_init_mtrr();
+#endif
 }
 
 /* The suspend/resume methods are only for CPU without MTRR. CPU using generic
@@ -593,6 +599,7 @@ void __init mtrr_bp_init(void)
                        size_and_mask = 0;
                }
        } else {
+#ifndef CONFIG_X86_64
                switch (boot_cpu_data.x86_vendor) {
                case X86_VENDOR_AMD:
                        if (cpu_has_k6_mtrr) {
@@ -619,6 +626,7 @@ void __init mtrr_bp_init(void)
                default:
                        break;
                }
+#endif
        }
 
        if (mtrr_if) {